POV-Ray : Newsgroups : povray.general : Textures and slopes : Re: Textures and slopes Server Time
3 Aug 2024 10:20:07 EDT (-0400)
  Re: Textures and slopes  
From: Chambers
Date: 18 Mar 2004 15:45:43
Message: <405a0a77$1@news.povray.org>
"Vincent LE CHEVALIER" <lec### [at] ctiecpfr> wrote in message
news:4058196c$1@news.povray.org...
> Hello !
>
> I've been trying to render the same landscape in POV-Ray and Terragen,
> and I found myself stuck in the texturing. I wonder, in fact, if there
> is a way to do the same texturing in POV and Terragen.
>
> As far as I understand, Terragen's textures are organized in several
> layers, each with a specific color and amount of bumps. So far, layered
> textures would do the trick. The point is that in Terragen, you can
> control the visibility of a layer based on the slope of the underlying
> layers. For example, you can have a rock layer, very bumpy, and a snow
> layer over it, only in the less slopy areas, with its own bumps.
>
> I tried to achieve such effect with a slope pattern in a layered
> texture, but in this case the slope used is just that of the
> height_field, not including the normal perturbation.
>
> I can obtain something similar using slope-patterned pigments and only
> one normal statement, but then I lose the control over the bumps of each
> layer.
>
> Has anyone got an idea about how to solve this problem ?

You could write a function for the texture to do this (6.7.11.15 in the
docs).  If you wanted access to the slope data, you could first draw the
heightfield from straight up using an orthogonal image and a b&w gradient in
the y-direction, and load this image as function image (6.7.11.16 in the
docs), and then check differences in the function at the exact point and
several points nearby to determine the change in altitude.  Combine the
dependancy on change in altitude with a dependancy on the altitude, and in
fact the x-z region where the point lies, and you've got great potential for
a vibrant image.

Sorry I can't give more specific info at the moment, if you have more
questions feel free to ask and I'll try as best I can to answer them a bit
later.

-- 
...Chambers
http://www.geocities.com/bdchambers79


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.